Aiming at the problem of low efficiency of multi-target detection and tracking of unmanned aerial vehicle (UAV) swarms under the restricted sensing range, a detection and tracking method of UAV swarms based on the clonal selection-infection immunity model is proposed. The virus infection process is introduced into the information transmission of the UAV swarm, and the UAV decision-making activation mechanism is constructed to ensure the effective scheduling of cluster resources; the UAV strategy decision-making mechanism is constructed by introducing the clone selection process to ensure the reasonable operation of the UAV. At the same time, the "overheating" strategy judgment mechanism is introduced to prevent the same strategy from being executed by multiple drones, and to reduce the probability of missing targets. The simulation results show that the proposed method can effectively improve the detection coverage area of the cluster area and realize the tracking of more targets.